package com.music.demo.repository;

import com.music.demo.model.Music;
import com.music.demo.model.Product;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import java.util.List;

@Mapper
@Component
public interface MusicMapper {
    int insert(Music record);

    int insertSelective(Music record);

    List<Music> selectMusic(@Param("type") String type, @Param("singer") String singer);

    List<String> selectSinger();

    List<String> selectType();

    int deleteMusic(Integer musicId);

    int sellProd(@Param("code") String code, @Param("count") Integer count);

    List<Product> selectProduct();

	int getStock(String code);
}
